package me.myachievements.web.tag;

import java.util.List;

import me.myachievements.persistence.tag.Tag;
import me.myachievements.persistence.tag.TagPersistenceManager;

import org.apache.wicket.injection.web.InjectorHolder;
import org.apache.wicket.model.LoadableDetachableModel;
import org.apache.wicket.spring.injection.annot.SpringBean;

public abstract class GoalTagsModel extends LoadableDetachableModel<List<Tag>> {
	
	@SpringBean(name="tagPersistenceManager")
	protected TagPersistenceManager tagPersistanceManager;
	
	private Long goalId;
	
	/**
	 * Constructor
	 * @param goalId
	 */
	public GoalTagsModel(Long goalId){
		InjectorHolder.getInjector().inject(this);
		
		this.goalId = goalId;
	}

	/**
	 * @return the goalId
	 */
	protected Long getGoalId() {
		return goalId;
	}

}
